<?php

namespace app\index\controller;

use app\common\controller\Frontend;
use fast\Http;
class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        return $this->view->fetch();
    }
	public function caiji(){
		$send = rand(100,500)/100;
		sleep($send);
		dump($send);exit;
        // $no = 'JT4283054732340,JT4283054732291';
		// $model = new \app\admin\model\Caijishuju();
		// $model->caiji($no);
        // $url = 'https://wdgw.jtexpress.com.cn/sqsthird/thirdService/waybill/commonWaybillListByWaybillNos';
        // $token = '0219efded696462d9c3b9fb7f24c0a4b';
        // $res = Http::get($url,['waybillNos'=>$no]);
        // $json = json_decode($res,1);
        // dump($json);
    }
    public function getphone($no,$orderSourceName,$orderSourceCode){
        $url = 'https://wdgw.jtexpress.com.cn/sqsthird/integration/getWaybillsByReverse';
        $data=[
            'waybillId'=>$no,
            'queryReason'=>'YTH',
            'orderSourceName'=>$orderSourceName,
            'orderSourceCode'=>$orderSourceCode
        ];
        $res = Http::get($url,$data);
        $json = json_decode($res,1);
        // dump($json);
		return $json;
    }
}
